package com.smart.manager.product.entities.body;

import com.smart.common.entities.core.BaseSearch;
import com.smart.common.entities.domain.Address;
import com.smart.manager.product.entities.enums.PlaceStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 游戏管理  场地资料
 * @author leo
 * @date 2023/09/05
 */
public class RBasicPlace {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RBasicPlace1")
    public static class SearchBody extends BaseSearch {

        @ApiModelProperty("场地代码")
        private String code;

        @ApiModelProperty("场地名称")
        private String name;

        @ApiModelProperty("场地状态")
        private PlaceStatus status;

    }


    @Data
    @ApiModel("RBasicPlace2")
    public static class EditBody  implements Serializable {

        @ApiModelProperty("场地代码")
        @NotBlank(message = "场地不能为空")
        private String code;

        @ApiModelProperty("场地名称")
        @NotBlank(message = "场地名称 不能为空")
        private String name;

        @ApiModelProperty("场地地址")
        private Address address;

        @ApiModelProperty("场地描述")
        private String describe;

        @ApiModelProperty("场地状态")
        @NotNull(message = "场地状态 不能为空")
        private PlaceStatus status;

        @ApiModelProperty("显示排序")
        @Min(value = 0,message = "显示排序 不能小于0")
        @Max(value = 999,message = "显示排序 不能大于999")
        private Integer sort;

    }


}
